# 导包
import unittest
from scripts.test01_login import TestLoginAPI
from htmltestreport import HTMLTestReport
import config
from scripts.test02_register import TestRegisterAPI
from scripts.test03_tup_up import Test_tup_up
from scripts.test04_Investment import Test_InvestmentApi


# 组装测试套件
suite = unittest.TestSuite()
# 运行整个测试类中方法
# suite.addTest(unittest.makeSuite(TestLoginAPI))
# suite.addTest(unittest.makeSuite(TestRegisterAPI))
suite.addTest(unittest.makeSuite(Test_tup_up))
suite.addTest(unittest.makeSuite(Test_InvestmentApi))
# 运行测试类中指定的测试方法
suite.addTest(TestLoginAPI("test01_login"))

# 创建runner
report = config.BASE_PATH + "/report/index1.html"
runner = HTMLTestReport(report, title="P2P接口自动化测试报告")

# 执行测试套件suite
runner.run(suite)
